/*********************\
* Author:Dzlua
* QQ:505544956
* Time:2017/04/15
\**********************/
#ifndef __LUA_EDIT_H__
#define __LUA_EDIT_H__
#pragma once

#include "../Text/LuaLabel.h"

namespace DuiLib {

class LuaEdit : public LuaLabel
{
    SDLUA_CLASS_DECLARE(LuaEdit);

    void SetEnabled(bool bEnable);
    int SetText(LuaState *L);
    void SetMaxChar(UINT uMax);
    UINT GetMaxChar();
    void SetReadOnly(bool bReadOnly);
    bool IsReadOnly();
    void SetPasswordMode(bool bPasswordMode);
    bool IsPasswordMode();
    int SetPasswordChar(LuaState *L);
    int GetPasswordChar(LuaState *L);
    void SetNumberOnly(bool bNumberOnly);
    bool IsNumberOnly();
    int GetWindowStyls();

    int GetNormalImage(LuaState *L);
    int SetNormalImage(LuaState *L);
    int GetHotImage(LuaState *L);
    int SetHotImage(LuaState *L);
    int GetFocusedImage(LuaState *L);
    int SetFocusedImage(LuaState *L);
    int GetDisabledImage(LuaState *L);
    int SetDisabledImage(LuaState *L);
    void SetNativeEditBkColor(DWORD dwBkColor);
    DWORD GetNativeEditBkColor();
    int SetNativeEditTextColor(LuaState *L);
    DWORD GetNativeEditTextColor();

    void SetSel(long nStartChar, long nEndChar);
    void SetSelAll();
    int SetReplaceSel(LuaState *L);

    int SetTipValue(LuaState *L);
    int GetTipValue(LuaState *L);
    int SetTipValueColor(LuaState *L);
    DWORD GetTipValueColor();

    int SetPos(LuaState *L);
    int Move(LuaState *L);
    void SetVisible(bool bVisible);
    void SetInternVisible(bool bVisible);
    int EstimateSize(LuaState *L);
};

}

#endif //__LUA_EDIT_H__